package org.example.system.mapper;

import org.apache.ibatis.annotations.Select;
import org.example.system.model.entity.BizModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.example.system.model.vo.ModelVo;

import java.util.List;

/**
* @author Administrator
* @description 针对表【biz_model(车型表)】的数据库操作Mapper
* @createDate 2024-11-09 19:08:01
* @Entity org.example.system.model.entity.BizModel
*/
public interface BizModelMapper extends BaseMapper<BizModel> {


    @Select("""
        SELECT ROW_NUMBER() OVER (ORDER BY model_type) AS serial_number, biz_model.model_type, MIN(daily_rent) AS min_price FROM biz_model GROUP BY model_type
    """)
    List<ModelVo> getCarTypeWithMinPrice();
}




